
class FileHandleDialog < Gtk::FileChooserDialog
  @CWD = nil

  def initialize parent_window,title,actionType,filename
    super(title, parent_window,
      actionType, nil,
      [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
      [Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK])

    self.default_response = Gtk::Dialog::RESPONSE_OK
    self.current_folder = @CWD unless @CWD.nil?
    self.current_name = filename if filename != nil 
    signal_connect :response do |dialog, response|
      @CWD = self.current_folder if response == Gtk::Dialog::RESPONSE_OK
    end
  end
end